package com.xiaobai.zhuangxiuguanjia.model;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2015/6/15 0015.
 */
public class Design {
    private String rows;
    private String title;
    private String oldcid;
    private String isCollection;
    private String webUrl;
    private String edittime;
    private List<Info> infoList;
    public void parseJSON(JSONObject json){
        rows = json.optString("rows");
        title = json.optString("title");
        oldcid = json.optString("oldcid");
        isCollection = json.optString("isCollection");
        webUrl = json.optString("webUrl");
        edittime = json.optString("edittime");
        infoList = new ArrayList<Info>();
        JSONArray infos = json.optJSONArray("info");
        for (int i=0;i<infos.length();i++){
            JSONObject jsonObject = infos.optJSONObject(i);
            Info info = new Info();
            info.parseJSON(jsonObject);
            infoList.add(info);
        }
    }

    public String getEdittime() {
        return edittime;
    }
    public String getRows() {
        return rows;
    }

    public String getTitle() {
        return title;
    }

    public String getOldcid() {
        return oldcid;
    }

    public String getIsCollection() {
        return isCollection;
    }

    public String getWebUrl() {
        return webUrl;
    }

    public List<Info> getInfoList() {
        return infoList;
    }
}
